﻿using System;
using Behaviours.Helper;

namespace Behaviours.Network.Codec
{
    public class ProtobufCodec:ICodec
    {
        public byte[] Encode(object obj)
        {
            return ProtobufHelper.ToBytes(obj);
        }

        public object Decode(byte[] bytes)
        {
            throw new System.Exception();
            Type t = null;
            return ProtobufHelper.FromBytes(t,bytes,0,bytes.Length);
        }
    }
}